<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div>
      {{ info }}
      <!-- 让控件的值和变量双向绑定 变量值改变会影响页面 页面的改变也会影响变量 -->
      <input type="text" v-model="info" />
      <hr />
      用户名：<input type="text" v-model="username" />

      密码：<input type="password" v-model="password" /> 
    </div>

    <!-- 本地引入vue.js框架文件 -->
    <script src="js/vue.js"></script>
    <script>
      let app = new Vue({
        el: "body>div",
        data: {
          info: "双向绑定测试",
          username: "",
          password: "",
        },
      });
    </script>
  </body>
</html>
